Sync to Tango API v4.6.9: budget surface, singleton GETs, bug fixes (v1.1.0)#9
Merged
Conversation
…ixes)
BREAKING CHANGE: remove getIdvSummary and listIdvSummaryAwards — these called
/api/idvs/{id}/summary/ and /summary/awards/, which have never existed in the
API. No consumer could have used them successfully.
Phase 1 (bug fixes):
- Contract interface: drop dead fields (id, award_id, recipient_name,
award_amount, awarding_agency, funding_agency); add real ContractList fields
with proper nested types. All fields optional (shape-on-demand). Old fields
kept as @deprecated, to be removed in 2.0.0.
- listContracts: stop sending page=1 to the cursor-only /api/contracts/.
- remove getIdvSummary / listIdvSummaryAwards (see breaking change above).
- add listVehicleOrders (parity with Python).
Phase 2 (additive):
- budget accounts surface: listBudgetAccounts, getBudgetAccount,
getBudgetAccountQuarters, getBudgetAccountRecipients (+ BudgetAccount type).
- singleton detail GETs: getContract, getContractSubawards,
getContractTransactions, getForecast, getGrant, getNotice, getOpportunity,
getSubaward.
- getEntityBudgetFlows(uei).
- grantId filter on listGrants.
Phase 3 (CI):
- add ci.yml PR gate (lint, typecheck, build, test on Node 18/20/22;
conformance as a non-blocking job).
Version bump to 1.1.0.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Comment on lines
+19
to
+53
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: [ubuntu-latest] | ||
| node-version: ["18", "20", "22"] | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Node.js ${{ matrix.node-version }} | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: ${{ matrix.node-version }} | ||
|
|
||
| - name: Install dependencies | ||
| # No lockfile is committed (package-lock.json is gitignored), and the | ||
| # "prepare" script runs a build that needs tsc — so ignore scripts here | ||
| # and build explicitly below. | ||
| run: npm install --ignore-scripts --no-audit --no-fund | ||
|
|
||
| - name: Lint | ||
| run: npm run lint | ||
|
|
||
| - name: Typecheck | ||
| run: npm run typecheck | ||
|
|
||
| - name: Build | ||
| run: npm run build | ||
|
|
||
| - name: Test | ||
| # `vitest run` forces a single non-watch pass in CI. | ||
| run: npx vitest run | ||
|
|
||
| conformance: |
CONTRACT_SCHEMA/IDV_SCHEMA reference the competition leaf as "ContractOrIDVCompetition" but only "Competition" was registered in EXPLICIT_SCHEMAS, so competition(...) nested selections on contract/IDV shapes failed validation. Register the name as an alias of COMPETITION_SCHEMA. Fixes tango-python#29 item 1. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The new ci.yml surfaced two issues unrelated to the API sync: the conformance job failed because the private makegov/tango checkout needs an unconfigured TANGO_API_REPO_ACCESS_TOKEN secret, and a real-HTTP-server webhooks round-trip test timed out at the default 5s on the slower Node 18 runner (passed on 20/22). Gate the conformance steps on the token being present so the job skips cleanly (green) instead of failing red, and becomes a real gate once the secret exists. Give the round-trip test an explicit 20s timeout. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Comment on lines
+59
to
+97
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Determine token availability | ||
| id: gate | ||
| env: | ||
| TANGO_API_REPO_ACCESS_TOKEN: ${{ secrets.TANGO_API_REPO_ACCESS_TOKEN }} | ||
| run: | | ||
| if [ -n "$TANGO_API_REPO_ACCESS_TOKEN" ]; then | ||
| echo "ready=true" >> "$GITHUB_OUTPUT" | ||
| else | ||
| echo "ready=false" >> "$GITHUB_OUTPUT" | ||
| echo "::notice::Skipping SDK conformance check — TANGO_API_REPO_ACCESS_TOKEN not configured." | ||
| fi | ||
|
|
||
| - uses: actions/checkout@v4 | ||
| if: steps.gate.outputs.ready == 'true' | ||
|
|
||
| - name: Checkout tango API repo (manifest source) | ||
| if: steps.gate.outputs.ready == 'true' | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| repository: makegov/tango | ||
| path: tango-api | ||
| token: ${{ secrets.TANGO_API_REPO_ACCESS_TOKEN }} | ||
|
|
||
| - name: Set up Node.js | ||
| if: steps.gate.outputs.ready == 'true' | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: "20" | ||
|
|
||
| - name: Install dependencies | ||
| if: steps.gate.outputs.ready == 'true' | ||
| run: npm install --ignore-scripts --no-audit --no-fund | ||
|
|
||
| - name: Check SDK filter/shape conformance | ||
| if: steps.gate.outputs.ready == 'true' | ||
| run: npx tsx scripts/check-filter-shape-conformance.ts --manifest tango-api/contracts/filter_shape_contract.json |
The first round-trip test got a 20s timeout last commit; the sibling "propagates the server's status code and body" test in the same describe block hit the same default-5s timeout on the slow Node 18 runner. Give it the same explicit 20s timeout. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Syncs the Node SDK to Tango API v4.6.9. The v1.0.0 parity sweep closed most of the historical gap; this closes the rest of the agreed-on surface and fixes real bugs. Version bump 1.0.0 → 1.1.0.
Paired with makegov/tango-python — both PRs keep the cross-SDK parity tests green.
Phase 1 — Bug fixes
Contractinterface: dropped dead fields (id,award_id,recipient_name,award_amount,awarding_agency,funding_agency) the API has never returned; added the realContractListfield set with proper nested types (OrganizationOfficePayload,PlaceOfPerformance,SubawardsSummary,LegislativeMandates,ParentAwardReference). Every field optional (shape-on-demand). Old fields kept as@deprecated→ removed in 2.0.0.Contractis an exported, user-facing type, so this corrects the shape consumers code against.listContracts: stopped sendingpage=1to/api/contracts/, which is cursor-only (KeysetPagination) and ignorespage. Also fixed a stale code comment claiming page-based pagination.getIdvSummary/listIdvSummaryAwards— they called/api/idvs/{id}/summary/and/summary/awards/, which have never existed in the API. No consumer could have used them successfully. Breaking change, flagged in CHANGELOG.listVehicleOrdersadded (parity with Python'slist_vehicle_orders).Phase 2 — Additive surfaces
listBudgetAccounts,getBudgetAccount,getBudgetAccountQuarters,getBudgetAccountRecipients+BudgetAccountinterface.getContract,getContractSubawards,getContractTransactions,getForecast,getGrant,getNotice,getOpportunity,getSubaward.getEntityBudgetFlows(uei).grantIdfilter onlistGrants.Phase 3 — CI
ci.ymlPR gate: lint, typecheck, build, and test across Node 18/20/22; conformance runs as a separate non-blocking job. (Previously the repo had no PR-gating workflow.)Deferred (by decision)
accounts/usage(internal), G2X events/news/company-rag, canonical webhook-subscriptions CRUD, PUT/PATCH webhook aliases,cagealias (already covered bycage_code).Test plan
npx vitest run→ 220 passed (23 files); conformance errors=0npm run lint+npm run typecheckcleanpage=1behavior + removed the 2 calls to the deleted IDV-summary methodsX-Requests-Remainingheader verification (deferred to a live smoke test)🤖 Generated with Claude Code
~ Mark